package com.cloudkinto.common.utils.dict;


import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class StaticUtils {


    /**
     * 入库单托盘类型
     * @return
     */
    public static List<Map<String, Object>> getOrderInputBoxType() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (StaticDict.Order_Input_Box_Type value : StaticDict.Order_Input_Box_Type.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("value", value.getText());
            list.add(map);
        }
        return list;
    }

    /**
     * 入库单运输方式
     * @return
     */
    public static List<Map<String, Object>> getOrderInputTrackType() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (StaticDict.Order_Input_Track_Type value : StaticDict.Order_Input_Track_Type.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("value", value.getText());
            list.add(map);
        }
        return list;
    }

    /**
     * 入库单状态
     * @return
     */
    public static List<Map<String, Object>> getOrderInputStatusType() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (StaticDict.Order_Input_Status_Type value : StaticDict.Order_Input_Status_Type.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("value", value.getText());
            list.add(map);
        }
        return list;
    }

    /**
     * 出库单状态
     * @return
     */
    public static List<Map<String, Object>> getOrderOutputStatusType() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (StaticDict.Order_Output_Status_Type value : StaticDict.Order_Output_Status_Type.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("value", value.getText());
            list.add(map);
        }
        return list;
    }


    /**
     * 出库单 发货方式
     * @return
     */
    public static List<Map<String, Object>> getOrderOutputSendType() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (StaticDict.Order_Output_Send_Type value : StaticDict.Order_Output_Send_Type.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("value", value.getText());
            list.add(map);
        }
        return list;
    }


    /**
     * 地址类型
     * @return
     */
    public static List<Map<String, Object>> getOrderAddressType() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (StaticDict.Order_Address_Type value : StaticDict.Order_Address_Type.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("value", value.getText());
            list.add(map);
        }
        return list;
    }


    /**
     * 异常订单 货物状态
     * @return
     */
    public static List<Map<String, Object>> getOrderProblemGoodStausType() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (StaticDict.Order_Problem_Good_Status_Type value : StaticDict.Order_Problem_Good_Status_Type.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("value", value.getText());
            list.add(map);
        }
        return list;
    }

    /**
     * 库存流水类型
     * @return
     */
    public static List<Map<String, Object>> getOrder_Box_Flowing_Type() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (StaticDict.Order_Box_Flowing_Type value : StaticDict.Order_Box_Flowing_Type.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("id", value.getValue());
            map.put("value", value.getText());
            list.add(map);
        }
        return list;
    }
}
